cmake_minimum_required(VERSION 3.16)
project(Qt_template)

set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_INSTALL_PREFIX ${CMAKE_CURRENT_SOURCE_DIR}/install)

find_package(Qt5
        COMPONENTS Core Widgets 
        REQUIRED)

add_executable( Qt_template main.cpp )

target_link_libraries(Qt_template Qt5::Widgets Qt5::Core)

install(TARGETS Qt_template
        DESTINATION ${CMAKE_INSTALL_PREFIX})